package com.renge.cmsservice.homepage;

import com.renge.cmsservice.entity.CrmBanner;
import com.renge.cmsservice.service.CrmBannerService;
import com.renge.commonutils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首页 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2021-05-17
 */
@Api(description="首页轮播图前台管理")
@RestController
@CrossOrigin
@RequestMapping("/cmsservice/crm-banner")
public class IndexFrontController {
    @Autowired
    private CrmBannerService crmBannerService;
    @ApiOperation(value = "查询轮播图页面")
    @GetMapping("/fristbanner")
    public R IndexfindBanner(){
        List<CrmBanner> bannerList= crmBannerService.IndexfindBanner();
        return R.ok().data("bannerList",bannerList);
    }
}
